<template>

  <a-drawer
    :title="title"
    :visible="visible"
    :destroyOnClose="true"
    :width="1000"
    @close="close"
  >
    <a-descriptions :title="model.eventType">
      <a-descriptions-item label="发生时间">
        {{model.eventTime}}
      </a-descriptions-item>
      <a-descriptions-item label="摄像头">
        {{model.deviceName }}
      </a-descriptions-item>
      <a-descriptions-item label="事件ID">
        {{model.eventId}}
      </a-descriptions-item>

    </a-descriptions>

    <img style="width: 100%" v-if="model.url" :src="model.url">

  </a-drawer>
</template>

<script>
import {initTheme} from '@/components/SettingDrawer/settingConfig'
import defaultSettings from '@/config/defaultSettings'

export default {
  name:'eventDetail',
  components:{

  },
  data(){
    return{
      title:'事件详情',
      visible:false,
      confirmLoading: false,
      model:{},



    }
  },
  methods:{
    initTheme(){
      let theme = localStorage.getItem(defaultSettings.localStorageThemeKey)
      initTheme(theme || defaultSettings.primaryTheme)
    },
    edit (record) {
      this.model=record
      this.visible=true
    },
    handleOk(){

      this.close()
    },
    handleCancel(){
      this.visible=false
    },
    close () {
      this.$emit('close');
      this.visible = false;
    },
    /**
     * 表单内容发生变化
     */
    changeEventHandler(changeItem){}
  },
  created(){
    // this.initTheme()
  },
}
</script>

<style scoped>


</style>

